//导入数据库模块
let mysql = require ('mysql')
//数据库连接配置
let config ={
    host: '127.0.0.1',
    port:3306,
    user:'root',
    password:'root',
    database:'sms'
}

//声明创建连接的函数
function getConnection(){
    let connection = mysql.createConnection(config)
    return connection
}

exports.getConnection = getConnection